chore(tao): migrate decorated-window-tao to Compose 1.12.0-rc01 - #354
Merged
Conversation
kdroidFilter
force-pushed
the
chore/compose-1.12-beta02-tao
branch
2 times, most recently
from
July 26, 2026 12:14
3799541 to
1bcd42f
Compare
kdroidFilter
added a commit
that referenced
this pull request
Aug 16, 2026
Rebased PR #354 on main and bumped Compose from 1.12.0-beta02 to the latest RC. Scene create/render/dispose lives in TaoSceneBundle so the 1.12 FrameRecomposer + measureAndLayout + draw split is in one place. Material3 moves to 1.12.0-alpha03 (Expressive APIs) and hot-reload to 1.2.0 to match the RC plugin bundle.
kdroidFilter
force-pushed
the
chore/compose-1.12-beta02-tao
branch
from
August 16, 2026 08:57
1bcd42f to
130570f
Compare
kdroidFilter
marked this pull request as ready for review
August 16, 2026 11:50
Rebased PR #354 on main and bumped Compose from 1.12.0-beta02 to the latest RC. Scene create/render/dispose lives in TaoSceneBundle so the 1.12 FrameRecomposer + measureAndLayout + draw split is in one place. Material3 moves to 1.12.0-alpha03 (Expressive APIs) and hot-reload to 1.2.0 to match the RC plugin bundle.
kdroidFilter
force-pushed
the
chore/compose-1.12-beta02-tao
branch
from
August 16, 2026 11:53
130570f to
5d5cfc4
Compare
Collaborator
Author
|
Retargeted from
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Get ahead of the Compose 1.12 release: the no-AWT
decorated-window-taobackend drives Compose's internal
androidx.compose.ui.scene.*APIs directly,so it's the one module that breaks on a minor Compose bump.
Rebased on current
main(the previous head conflicted after the TaoJetBrains-style refactor). Bumped from
1.12.0-beta02to1.12.0-rc01(latest published RC —
1.12.0stable is still not out). Catalog flip tostable later is one line.
What changed in the 1.12 ComposeScene API
ComposeScene.render(canvas, nanoTime)removed → three steps:FrameRecomposer.performFrame(nanoTime)+ComposeScene.measureAndLayout()+ComposeScene.draw(canvas).Canvas/PlatformLayersComposeScene) dropcoroutineContextinvalidate; now take aFrameRecomposer(which owns the frame clock) +invalidateLayout/invalidateDraw. The manual per-hostBroadcastFrameClockand
frameClock.sendFrame()calls are gone.ComposeSceneContext.createLayer:compositionContext→consumePointerInputOutside.ComposeSceneLayer.setContent(parentCompositionContext, content)+ new abstractconsumePointerInputOutsideproperty.LocalSystemThemeis now internal and typed as SkikoSystemTheme.ProvideNucleusSystemThemestill feeds Nucleus's live dark-mode detector intothat local (
INVISIBLE_REFERENCE, same pattern as other Compose-internalbridges).
Approach
Scene create/render/dispose plumbing is centralized in
TaoSceneBundle(
scene/TaoSceneBundle.kt). Each host/popup/overlay stores aTaoSceneBundle?and keeps
val scene get() = sceneBundle?.scene, so the ~20scene?.…callsites per file are untouched — only create/render/close move. Future Compose
bumps touch one file for the shared logic.
Behaviour is kept at parity with the 1.11 path: the paced
frameNsis still fedto the frame clock for standalone popups, and every invalidation
(
invalidateLayout/invalidateDraw+ the recomposer's own) funnels into thesame coalescing frame scheduler that
invalidateused before.The offscreen scene test harness (
TaoSceneTestHarness) moves onto the samebundle:
recordSceneToPicture→FrameRecomposer.performFrame, which flushesits own dispatchers around the tick.
Note:
SingleComposeSceneRenderingScopeCompose Desktop's AWT path wraps the three render calls in
SingleComposeSceneRenderingScope.render, but that method is Kotlin-internal(JVM-public, module-private) and invisible to external backends.
TaoSceneBundleinlines
performFrame→measureAndLayout→drawdirectly. The only thinglost vs. upstream is its
isRendering-guarded invalidation de-dup — which theold Tao code didn't have either, and the FrameDispatcher coalescing covers it.
Catalog
main)Fallout: AGP 9 / Java 17
Compose 1.12 also pulls AndroidX Compose 1.12 into
examples:cmp-demo's Androidtarget, which requires AGP ≥ 9.1 and compileSdk 37. That cascades:
agp8.13.2 → 9.1.1 (9.2+ needs Gradle ≥ 9.4.1, we're on 9.4.0), cmp-democompileSdk/targetSdk35 → 37.android.builtInKotlin=false+android.newDsl=false: since AGP 9,com.android.applicationis rejected alongside the KMP plugin, which points atcom.android.kotlin.multiplatform.library— a library plugin, unusable forcmp-demo (a KMP module that builds a real Android app) without splitting it into
a separate
:androidAppmodule. These are AGP's documented escape hatches.plugin-build/pluginjvmTarget 11 → 17 — AGP 9 artifacts are built for 17and can't be resolved by an 11-targeted consumer. User-visible: the Nucleus
Gradle plugin now needs a Gradle daemon on JVM 17+ (mandatory since Gradle 9
anyway; Gradle 8 + JVM 11 setups are no longer supported).
org.jetbrains.skia.Surfaceimport from cmp-demo'scommonMain— unused, and unresolvable on Android.Verification
:decorated-window-tao:compileKotlin+compileTestKotlin— clean on thisrebase (macOS / JDK 21).
:nucleus-application:compileKotlin,:examples:compose-demo:compileKotlin,:examples:extra-launcher-demo:compileKotlin.LoadingIndicator300.dp + wavy indicators): Tao window comes up on 1.12 RCand paints. Whole-process
phys_footprint(Activity Monitor Memory) idle →animating is 170 → 284 MB on Tao vs 247 → 353 MB on vanilla Compose
Desktop. The jump is Metal GPU cache (
Owned physical footprint (unmapped) (graphics)), not a 1.12/Tao regression.Not re-run on this rebase: the full
:decorated-window-tao:checksuite fromthe original PR (78 tests), plugin-build
:plugin:check,assembleDebugforcmp-demo, or native smoke on Windows / Linux.
Before merge
composeline to1.12.0stable when it ships:decorated-window-tao:checkand plugin-build checks after CI